export const constantRoutes = [
  /*
   hidden:表示在menu中隐藏不隐藏
   title:表示在menu中显示的标题
   icon:表示在menu中显示的图标

  */

  //登录页面
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/index.vue'),
    meta: {
      title: '登录',
      hidden: true,
    },
  },
  // 登录成功后的页面
  {
    path: '/',
    name: 'home',
    component: () => import('@/views/layout/index.vue'),
    meta: {
      icon: 'HomeFilled',
    },
    redirect: '/home',
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页',
          hidden: false,
          icon: 'HomeFilled',
        },
      },
    ],
  },
  // 404
  {
    path: '/404',
    name: '404',
    component: () => import('@/views/404/index.vue'),
    meta: {
      title: '404',
      hidden: true,
    },
  },
  // 没有匹配上之后跳转的路由
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'redirect',
    meta: {
      title: '任意路由',
      hidden: true,
    },
  },
  // 数据大屏
  {
    path: '/screen',
    name: 'screen',
    component: () => import('@/views/screen/index.vue'),
    meta: {
      title: '数据大屏',
      hidden: false,
      icon: 'Platform',
    },
  },
  // 玩家管理
  {
    path: '/custom',
    name: 'custom',
    component: () => import('@/views/layout/index.vue'),
    redirect: '/custom/user',
    meta: {
      title: '会员管理',
      hidden: false,
      icon: 'Lock',
    },
    children: [
      {
        path: '/custom/user',
        component: () => import('@/views/custom/user/index.vue'),
        name: 'customUser',
        meta: {
          title: '用户管理',
          hidden: false,
          icon: 'User',
        },
      },
      {
        path: '/custom/role',
        component: () => import('@/views/custom/role/index.vue'),
        name: 'customRole',
        meta: {
          title: '角色管理',
          hidden: false,
          icon: 'DataBoard',
        },
      },
      {
        path: '/custom/menu',
        component: () => import('@/views/custom/menu/index.vue'),

        name: 'customMenu',
        meta: {
          title: '菜单管理',
          hidden: false,
          icon: 'Menu',
        },
      },
    ],
  },
  // 订单中心
  {
    path: '/order',
    name: 'order',
    component: () => import('@/views/layout/index.vue'),
    redirect: '/order/user',
    meta: {
      title: '订单中心',
      hidden: false,
      icon: 'Lock',
    },
    children: [
      {
        path: '/order/user',
        component: () => import('@/views/order/user/index.vue'),
        name: 'orderUser',
        meta: {
          title: '用户管理',
          hidden: false,
          icon: 'User',
        },
      },
      {
        path: '/order/role',
        component: () => import('@/views/order/role/index.vue'),
        name: 'orderRole',
        meta: {
          title: '角色管理',
          hidden: false,
          icon: 'DataBoard',
        },
      },
      {
        path: '/order/menu',
        component: () => import('@/views/order/menu/index.vue'),

        name: 'orderMenu',
        meta: {
          title: '菜单管理',
          hidden: false,
          icon: 'Menu',
        },
      },
    ],
  },
  // 陪陪管理
  {
    path: '/staff',
    name: 'staff',
    component: () => import('@/views/layout/index.vue'),
    redirect: '/staff/user',
    meta: {
      title: '陪陪管理',
      hidden: false,
      icon: 'Lock',
    },
    children: [
      {
        path: '/staff/user',
        component: () => import('@/views/staff/user/index.vue'),
        name: 'staffUser',
        meta: {
          title: '陪陪管理',
          hidden: false,
          icon: 'User',
        },
      },
      {
        path: '/staff/role',
        component: () => import('@/views/staff/role/index.vue'),
        name: 'staffRole',
        meta: {
          title: '角色管理',
          hidden: false,
          icon: 'DataBoard',
        },
      },
      {
        path: '/staff/menu',
        component: () => import('@/views/staff/menu/index.vue'),

        name: 'staffMenu',
        meta: {
          title: '菜单管理',
          hidden: false,
          icon: 'Menu',
        },
      },
    ],
  },
  // 经营范围管理
  {
    path: '/manage',
    name: 'manage',
    component: () => import('@/views/layout/index.vue'),
    redirect: '/manage/game',
    meta: {
      title: '经营范围管理',
      hidden: false,
      icon: 'HelpFilled',
    },
    children: [
      {
        path: '/manage/game',
        component: () => import('@/views/manage/game/index.vue'),
        name: 'manageGame',
        meta: {
          title: '游戏管理',
          hidden: false,
          icon: 'ChromeFilled',
        },
      },
      {
        path: '/manage/flower',
        component: () => import('@/views/manage/flower/index.vue'),
        name: 'manageFlower',
        meta: {
          title: '鲜花管理',
          hidden: false,
          icon: 'Shop',
        },
      },
      {
        path: '/manage/other',
        component: () => import('@/views/manage/other/index.vue'),

        name: 'manageOther',
        meta: {
          title: '其他',
          hidden: false,
          icon: 'List',
        },
      },
    ],
  },
]
